﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using System.Net.NetworkInformation;

namespace NetTraceLib
{
    public class NodeStatus
    {
        public long ResponseTime { get; protected set; }
        public IPStatus Status { get; protected set; }
        public DateTime Timestamp { get; protected set; }
        public IPAddress Address { get; protected set; }
        
        public NodeStatus(IPAddress address,long responseTime, IPStatus status)
        {
            ResponseTime = responseTime;
            Status = status;
            Timestamp = DateTime.UtcNow;
            Address = address;
        }

        public override string ToString()
        {
            return String.Format("{0};{1};{2}", Timestamp.ToLocalTime().ToString(), Status.ToString(), ResponseTime);
        }
    }
}
